<div class="content">
	<div class="tab_bar">
		<ul>
			<li class="tab_index" onclick="setTabContent(this);">添加站点</li>
		</ul>
		<button class="btn_tabbar" onclick="submitActionForm(this);" return="site/list.do?currentPageNo=1">保 存</button>
	</div>

	<form id="myForm" action="site/save.do"  method="post" class="form-horizontal" onsubmit="return false;">
		<input id="channelIcon" name="icon" type="hidden" value="" />

	<div class="tab_content">
		<div class="tab_item tab_show">

			<div class="control-group">
				<label class="control-label">站点名称：</label>
				<div class="controls">
					<input name="title" type="text" placeholder=""/>
					<div class="help-block">
						站点名称
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">域名：</label>
				<div class="controls">
					<input name="host" type="text" placeholder=""/>
					<div class="help-block">
						请将域名的A记录解析到服务器IP
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">主题：</label>
				<div class="controls">
					<input name="theme" type="text" placeholder=""/>
					<div class="help-block">
						请将域名的A记录解析到服务器IP
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">描述信息：</label>
				<div class="controls">
					<textarea class="textarea_for_add" name="describe"></textarea>
					<div class="help-block">
						说明
					</div>
				</div>
			</div>

		</div>
	</div>
	</form>
</div>
<script type="text/javascript">


    var _editor = UE.getEditor('upload_ue');
    _editor.ready(function () {
        //设置编辑器不可用
        _editor.setDisabled();
        //隐藏编辑器，因为不会用到这个编辑器实例，所以要隐藏
        _editor.hide();
        //侦听图片上传
        _editor.addListener('beforeInsertImage', function (t, arg) {
            console.log(arg);
        })
        //侦听文件上传
        _editor.addListener('afterUpfile', function (t, arg) {
            if(arg.length > 0){
                $("#link-icon").attr("src", arg[0].src);
                $("#channelIcon").attr("value", arg[0].src);
            }
        })
    });

    function uploadImage(){
        var myImage = _editor.getDialog("insertimage");
        myImage.open();
    }
</script>